#!/bin/bash
if [ -f server.pid ]; then
    pid=$(cat server.pid)
    if ps -p $pid > /dev/null; then
        kill $pid
        echo "TTS server stopped (PID: $pid)"
    else
        echo "TTS server not running"
    fi
    rm server.pid
else
    echo "PID file not found"
fi
